/*
 *
 * 名称：六气
 * 功能：五运六气中六气属性配置
 * 作者：清河张
 * 时间：2025.05.11
 *
 */
#include "base/xzqm.h"
#include "liuqi.h"

YY6_T::YY6_T():
    CT(YYLIU___, "")
{

}

YY6_T::YY6_T(int id, const char *name):
    CT(id, name)
{

}

template <> YY6_T YY6::_objs[6]=
{
    {YY6_T::JUEEYINN,"厥阴"},
    {YY6_T::SHAOYINN,"少阴"},
    {YY6_T::TAIYINNN,"太阴"},
    {YY6_T::SHAOYANG,"少阳"},
    {YY6_T::YANGMING,"阳明"},
    {YY6_T::TAIYANGG,"太阳"},
};


LIUQI_T::LIUQI_T():
    CT(QI6_, "")
{

}

LIUQI_T::LIUQI_T(int id, const char *name):
    CT(id, name)
{

}


template <> LIUQI_T LIUQI6::_objs[6]=
{
    {LIUQI_T::FENG,"风"},
    {LIUQI_T::SHUU,"热"},
    {LIUQI_T::HUOO,"火"},
    {LIUQI_T::SHII,"湿"},
    {LIUQI_T::ZAOO,"燥"},
    {LIUQI_T::HANN,"寒"},
};


const YY6QI6 YY6QI6::_objs[6] =  //按五行排列(LIUQI_T)
{
    {0, 0, 5, "厥阴风木"},
    {1, 1, 0, "少阴君火"},
    {2, 2, 1, "少阳相火"},
    {3, 3, 3, "太阴湿土"},
    {4, 4, 2, "阳明燥金"},
    {5, 5, 4, "太阳寒水"},
};

const YY6QI6& YY6QI6::fromid(int id)
{
    return _objs[id % ARRSIZE(_objs)];
}

const YY6QI6 &YY6QI6::fromzq(int zq)
{
    return _objs[_objs[zq % ARRSIZE(_objs)]._zq];
}

const YY6QI6 &YY6QI6::fromkq(int kq)
{
    return _objs[_objs[kq % ARRSIZE(_objs)]._kq];
}

const char *YY6QI6::name() const
{
    return _name;
}

int YY6QI6::zq() const
{
    return _kq;
}

int YY6QI6::kq() const
{
    return _zq;
}

int YY6QI6::id() const
{
    return _id;
}

YY6QI6::YY6QI6():_id(-1), _zq(-1), _kq(-1), _name("")
{

}

YY6QI6::YY6QI6(int id, int zq, int kq, const char *name)
    : _id(id), _zq(zq), _kq(kq), _name(name)
{

}
